using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using IronMis2.Controllers;
using IronMis2.Models;

namespace IronMis2.Tests.Controllers
{
    [TestFixture]
    public class FinanceControllerTestCase:ARBaseControllerTest
    {
        FinanceController ctr;
        [SetUp]
        public void SetUp()
        {
            ctr = new FinanceController();
            PrepareController(ctr);
        }
        [Test]
        public void PayOut()
        {
            if (ctr != null) ctr.Pay_out();
            Payout[] payouts = (Payout[])ctr.PropertyBag["payouts"];
            Assert.IsNotNull(payouts);

            string viewName=Response.RedirectedTo;
            Assert.AreEqual(@"/Finance/Detail",viewName);
        }
    }
}
